<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width,initial-scale=0.0,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0"/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="author" content=""/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<link href="/assets/src/css/public.css" type="text/css" rel="stylesheet"/>
<link href="/assets/src/css/bluecolor.css" type="text/css" rel="stylesheet"/>
<!-- Link Swiper's CSS -->
<link rel="stylesheet" href="/assets/src/css/swiper.min.css"/>
   <script type="text/javascript" src="/assets/js/jquery-1.8.1.min.js"></script>
<style>

.index-nav {
	width: 100%;
	height: 30px;
	background-color: #fff;
	padding-top: 1px;
	padding-bottom: 1px;
}
.index-nav a {
	display: block;
	float: left;
	width: 32%;
	color: #999;
	font-size: 9px;
	text-align: center;
	line-height: 30px;
    height: 30px;
}
.buttonColor{
	background: rgba(169, 151, 151, 0.07);
}

</style>
<script type="text/javascript">
function diaUpdate(latid){
	if(confirm("确定打开该柜门并更新商品信息？")){
		var url ="/diauth/update";
		$.post(
			url,
			{Latid:latid},
			function(data){
				alert(data);
				  window.location.reload();
			}
		);
	}
}


function diaNoUpdate(latid){
	if(confirm("该柜子的商品尚未销售！确定打开该柜门并更新商品信息？")){
		var url ="/diauth/update";
		$.post(
			url,
			{Latid:latid},
			function(data){
				alert(data);
				  window.location.reload();
			}
		);
	}
}
</script>
<script type="text/javascript" src="/assets/js/commodities.js"></script>
<title>CIT商品列表</title>
</head>
<body>
<header class="product-hd hd-color"> <a href="javascript:;" onclick="history.go(-1)" class="pre index-pre"></a>商品列表 </header>

<!--热门课程模块-->
<article class="hot-course">

  <div class="hot-course-img-con clearfix">
  <c:forEach var="ictCommoditiesQuery" items="${ictCommoditiesQueryList }" begin="0" varStatus="status">
   
     <c:choose>
		<c:when test="${ictCommoditiesQuery.laNum <= 0}">
			<a href="avascript:;" onclick="diaUpdate(${ictCommoditiesQuery.id })"> 
			   	<div class="hot-course-img-one">
			      <div class="lk" style="position:relative;"><img src="/read/upload?name=/${ictCommoditiesQuery.coPhoto }" style="height: 120px;"/>
			        <p class="hot-black-txt" style="height: 30px;font-size: 20px;padding-top: 10px;">
			        	<span class="fl" style="font-size: 14px;color: red;">${status.index+1 }</span>
			        	<span class="fl" style="margin-left: 20px;">${ictCommoditiesQuery.coName }</span>
			        	<span class="fr" style="color: orange;">￥${ictCommoditiesQuery.salePrice }</span>
			        </p>
			          	<div style="position:absolute;width:100px;height:100px;z-indent:2;left:0;top:0;">
		       			<img src="/assets/images/timg.png" style="height: 50px;width:50px;"/>
		    			</div>
				   </div>
				</div>
			</a>
		</c:when>
		<c:otherwise>
		      <a href="avascript:;" onclick="diaNoUpdate(${ictCommoditiesQuery.id })"> 
			   	<div class="hot-course-img-one">
			      <div class="lk" style="position:relative;"><img src="/read/upload?name=/${ictCommoditiesQuery.coPhoto }" style="height: 120px;"/>
			        <p class="hot-black-txt" style="height: 30px;font-size: 20px;padding-top: 10px;">
			        	<span class="fl" style="font-size: 14px;color: red;">${status.index+1 }</span>
			        	<span class="fl" style="margin-left: 20px;">${ictCommoditiesQuery.coName }</span>
			        	<span class="fr" style="color: orange;">￥${ictCommoditiesQuery.salePrice }</span>
			        </p>
				  </div>
				</div>
			 </a>
		</c:otherwise> 
	</c:choose>
   
   
	</c:forEach>
  </div>
  


  

  

  


</article>

<!--底部-->
<%@ include file="../footer/footer.jsp"%>
<!-- Swiper JS --> 
<script src="/assets/src/js/swiper.min.js"></script> 

<!-- Initialize Swiper --> 
<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        paginationClickable: true,
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: 2500,
        autoplayDisableOnInteraction: false
    });
    </script>
</body>
</body>
</html>